package com.winning.devops.batch.writer.ch01;

import org.springframework.batch.item.ItemWriter;
import org.springframework.stereotype.Component;

import java.util.List;

/**
 * @author chensj
 * @date 2020-03-07 20-3-7
 */
@Component("itemDemoWriter")
public class ItemDemoWriter implements ItemWriter<String> {
    @Override
    public void write(List<? extends String> list) throws Exception {
        System.out.println(list.size());
        for (String s : list) {
            System.out.println(s);
        }
    }
}
